nts. Figure 2.15(b) shows the BIC distribution. It can be seen that
el structure was optimised when the Gamma mixture model
two components for this data set.
1+x)
umeric(x[which(x[,1]>0),1])
select(z,family='gamma',ncomp=1:3)
e multivariate density estimation
eal applications, multivariate density estimation may need to be
ed. The general principle of multivariate density estimation is the
being used in the univariate density estimation examples
tioned. There are mainly two R packages for multivariate density
n. They are the ks package and the knnDE package. The R
for using the kernel approach for estimating a density function for
imensional data set is ks. The R function of this package for
stimation is kde. Below is an example, where x is a matrix,
kde(x,⋯ )
unction returns an estimated density model. Figure 2.16(b) shows
cation of this function to the data set in a two-dimensional space
e clusters shown in Figure 2.16(a).
(a) (b)
An application of multivariate kernel-based density estimation for a two-
l data with three clusters. (a) The contour display, where dots are raw data
The 3D density which was estimated.